A conventional peripheral device for a PLC will be described below.
Operations in which in a conventional peripheral device for a PLC as disclosed, for example, in Japanese Patent Laid-Open No 44108/2003, a portion of a sequence program, designated by an operator, is diverted from diversion-source sequence program data that was created in the past into diversion-destination sequence program data will be described.
Firstly, in the diversion-source sequence program, an operator selects using an input device a portion of a sequence program to be diverted and performs copying.
Next, a peripheral device for a PLC carries out processing for copying into diversion data the selected portion of the sequence program to be diverted.
Next, the operator pastes the selected portion of the sequence program to be diverted to a portion into which the operator desires to insert in the diversion-destination sequence program.
Next, the peripheral device for a PLC inserts the portion of the sequence program to be diverted, recorded in the diversion data, into the position designated by the operator in the diversion-destination sequence program data.
According to the above-described processing, diversion of the portion of the sequence program to be diverted from the diversion-source sequence program data into the position designated by the operator in the diversion-destination sequence program data has been completed.
However, usually, an operation for replacing addresses used in the diverted portion of the sequence program in accordance with the diversion-destination sequence program must be performed. The replacement operation must be performed by the operator.
In the conventional peripheral device for a PLC, when a sequence program created in the past is reused to create a new sequence program, after a portion of the sequence program created in the past is copied and pasted into the new sequence program, it has been necessary that input/output addresses and internal addresses are manually replaced by the operator one by one. The replacement operation must be performed while considering address duplication and input/output types, so that a problem has been that creating a new sequence program by reusing a sequence program cannot be efficiently performed.
In addition, another problem has been that, when the same portion of a sequence program is diverted into a plurality of points, or diverted into a plurality of new sequence programs, the pasting of the portion of the sequence program and the operation of replacing input/output addresses and internal addresses must be manually repeated by the number of diversion points, which is inefficient.